﻿@model pbvs.Models.DomainModels.ValuationRequestDomainModel
		   
@using (Html.BeginForm("ValuationRequest", "Valuation", FormMethod.Post))
{
    @*@Html.HiddenFor(m => m.Survivorship, new { @id = "survivorship" })
    @Html.HiddenFor(m => m.CalculateMarriage, new { @id = "calculateMarriage" })*@
	<fieldset id="userData">
		@Html.Action("PartialContentView", "Content", new { pageName = "user-data" })
		<legend>User Data</legend>
		<div>
			<div class="">
				@Html.LabelFor(m => m.Client.FirstName)
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.FirstName)
			</div>
		</div>
		<div>
			<div class="">
				@Html.LabelFor(m => m.Client.LastName)
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.LastName)
			</div>
		</div>
		<div>
			<div class="">
				@Html.LabelFor(m => m.Client.Email)
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.Email)
			</div>
		</div>
		<div>
			<div class="">
				@Html.LabelFor(m => m.Client.CompanyName)
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.CompanyName)
			</div>
		</div>
		<div>
			<div class="">
				@Html.LabelFor(m => m.Client.Address)
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.Address)
			</div>
		</div>
		<div>
			<div class="">
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.Address2)
			</div>
		</div>
		<div>
			<div class="">
				@Html.LabelFor(m => m.Client.City)
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.City)
			</div>
		</div>
		<div>
			<div class="">
				@Html.LabelFor(m => m.Client.State)
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.State)
			</div>
		</div>
		<div>
			<div class="">
				@Html.LabelFor(m => m.Client.Zip)
			</div>
			<div class="">
				@Html.TextBoxFor(m => m.Client.Zip)
			</div>
		</div>
@*		<button id="userNextButton">Next</button>*@
	</fieldset>
    <fieldset id="planData" style="">
        <legend>Plan and Participant Data</legend>
        @Html.Action("PartialContentView","Content", new { pageName = "plan-participant-data" })
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.CaseId)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.CaseId, new { @id = "caseId" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.PlanName)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.PlanName, new { @id = "planName" })
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.ParticipantFirstName)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.ParticipantFirstName, new { @id = "participantFirstName" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.ParticipantLastName)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.ParticipantLastName, new { @id = "participantLastName" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.Gender)
            </div>
            <div class="">
                @Html.RadioButtonFor(m =>m.Gender,"M", new { @id = "genderM" }) Male
                @Html.RadioButtonFor(m =>m.Gender,"F", new { @id = "genderF" }) Female
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.Dob)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.Dob, new { @class = "date", @datePicker = "", @id = "dob" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.Doh)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.Doh, new { @class = "date", @datePicker = "", @id = "doh" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.Dot)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.Dot, new { @class = "date", @datePicker = "", @id = "dot" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.RetirementDate)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.RetirementDate, new { @class = "date", @datePicker = "", @id = "retirementDate" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.BenefitAtRetirement)
            </div>
            <div class="">
                $@Html.TextBoxFor(m => m.BenefitAtRetirement, new { @id = "monthlyBenefit" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.EarnedDate)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.EarnedDate, new { @class = "date", @datePicker = "", @id = "earnedDate" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.AnnuityType)
            </div>
            <div class="">
                @Html.DropDownListFor(m => m.AnnuityType, new List<SelectListItem> { new SelectListItem{ Text = "Annuity", Value="Annuity"}, new SelectListItem{ Text = "Life Only", Value = "Life Only"}})
            </div>
        </div>
@*        <button id="planBackButton">Back</button>
        <button id="planNextButton">Next</button>*@
    </fieldset>
    
    <fieldset id="valuationData" style="">
        <legend>Valuation Data and Assumptions</legend>
        @Html.Action("PartialContentView","Content", new { pageName = "valuation-data-assumptions" })
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.ValuationDate)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.ValuationDate, new { @class = "date", @datePicker = "", @id = "valuationDate" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.OverrideInterest)
            </div>
            <div class="">
                @Html.RadioButtonFor(m => m.OverrideInterest, true, new { @onclick = "toggleQuestion('interestRate', true);", @id = "overrideInterestTrue" }) Yes
                @Html.RadioButtonFor(m => m.OverrideInterest, false, new { @onclick = "toggleQuestion('interestRate', false);", @id = "overrideInterestFalse", @checked = "checked" }) No
                <span><a href="#">See default interest assumption</a></span>
            </div>
        </div>
        <div id="interestRate" class="controls">
            <div class="">
                @Html.LabelFor(m => m.InterestRate)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.InterestRate, new { @class = "numeric" }, true)%
            </div>
        </div>
        <div class="controls">
            The default mortality table cannot be specified.  For more information regarding why please click <a href="#" id="mortalityHelp">here</a>, or you can <a href="#">view the default mortality assumption</a>.
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.SubjectToCola)
            </div>
            <div class="">
                @Html.RadioButtonFor(m => m.SubjectToCola, true, new { @onclick = "toggleQuestion('divCola', true);", @id = "colaTrue" }) Yes
                @Html.RadioButtonFor(m => m.SubjectToCola, false, new { @onclick = "toggleQuestion('divCola', false);", @id = "colaFalse", @checked = "checked" }) No
            </div>
        </div>
        <div id="divCola" class="controls">
            <div class="">
                @Html.LabelFor(m => m.Cola)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.Cola, new { @class = "numeric", @id = "cola", @style = "width:50px;" }, true)%
            </div>
        </div>
@*        <button id="valuationBackButton">Back</button>
        <button id="valuationNextButton">Next</button>*@
    </fieldset>
    <div>
        <div>
            @Html.Label("Calculate Marriage?")
        </div>
        <div>
            <input type="radio" name="CalculateMarriage" id="calcMarriage" value="true" onclick="$('#marriageData').show();" /> Yes &nbsp;
            <input type="radio" name="CalculateMarriage" value="false" onclick="$('#marriageData').hide();" />No
        </div>
    </div>
    <fieldset id="marriageData" style="">
        <legend>Marriage Data</legend>
        @Html.Action("PartialContentView","Content", new { pageName = "marriage-data" })
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.UseFractional)
            </div>
            <div class="">
                @Html.RadioButtonFor(m => m.UseFractional, true, new { @onclick = "toggleQuestion('divMaritalPortion', false);", @id = "fractionalTrue", @checked = "checked" }) Yes
                @Html.RadioButtonFor(m => m.UseFractional, false, new { @onclick = "toggleQuestion('divMaritalPortion', true);", @id = "fractionalFalse" }) No
            </div>
        </div>
        <div id="divMaritalPortion" class="controls">
            <div class="">
                @Html.LabelFor(m => m.MaritalPortion)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.MaritalPortion, new { @id = "maritalPortion" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.MarriageDate)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.MarriageDate, new { @class = "date", @datePicker = "", @id = "marriageDate" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.EarningStartDate)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.EarningStartDate, new { @class = "date", @datePicker = "", @id = "marriageEarningStart" }, true)
            </div>
        </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.MarriageEarningEndDate)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.MarriageEarningEndDate, new { @class = "date", @datePicker = "", @id = "marriageEarningEnd" }, true)
            </div>
        </div>
@*        <button id="marriageBackButton">Back</button>
        <button id="marriageNextButton">Next</button>*@
     </fieldset>
    
    <div>
        <div>
            @Html.Label("Calculate Survivor?")
        </div>
        <div>
            <input type="radio" id="survivor" name="Survivorship" value="true" onclick="$('#survivorshipData').show();" />Yes &nbsp;
            <input type="radio" name="Survivorship" value="false" onclick="$('#survivorshipData').hide();" />No
        </div>
    </div>
    <fieldset id="survivorshipData" style="">
        <legend>Survivorship Benefit Data</legend>
         @Html.Action("PartialContentView","Content", new { pageName = "survivorship-benefit-data" })
       <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.SurvivorFirstName)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.SurvivorFirstName, new { @id = "survivorFirstName" }, true)
            </div>
        </div>
       <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.SurvivorLastName)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.SurvivorLastName, new { @id = "survivorLastName" }, true)
            </div>
        </div>
       <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.SurvivorGender)
            </div>
            <div class="">
                @Html.RadioButtonFor(m =>m.SurvivorGender,"M", new { @id = "survivorGenderM" }) Male
                @Html.RadioButtonFor(m =>m.SurvivorGender,"F", new { @id = "survivorGenderF" }) Female
            </div>
        </div>
	    <div class="controls">
		    <div class="">
			    @Html.LabelFor(m => m.SurvivorDob)
		    </div>
		    <div class="">
			    @Html.TextBoxFor(m => m.SurvivorDob, new { @class = "date", @datePicker = "", @id = "survivorDob" }, true)
		    </div>
	    </div>
        <div class="controls">
            <div class="">
                @Html.LabelFor(m => m.SurvivorshipPercentage)
            </div>
            <div class="">
                @Html.TextBoxFor(m => m.SurvivorshipPercentage, new { @id = "survivorPercentage" }, true)%
            </div>
        </div>
@*        <button id="survivorshipBackButton">Back</button>*@
     </fieldset>
        <button id="survivorshipNextButton">Next</button>
    
    <div id="survivorDialog" header="Survivorship Benefit?">
        Is there a survivorship benefit to be valued?

        <a href="#" id="survivorInfoLink">More Info</a>
        <div id="surivorInfo" class="moreinfo">
        
        </div>
    </div>
    <div id="marriageDialog" header="Calculate Marriage Portion?">
        Do you want to determine the marital portion of the value?

        <a href="#" id="marriageInfoLink">More Info</a>
        <div id="marriageInfo" class="moreinfo">
            
        </div>
    </div>
    <div id="mortalityDialog" header="Default Mortality Assumption">
    
    </div>
}

<script type="text/javascript">
	$(function () {
		$(".help").tipTip({
			defaultPosition: "right"
		});
		init();
	})
</script>